/*
 * @version: 1.0
 * @Author: zhl
 * @Date: 2021-09-10 10:39:22
 * @LastEditors: zhl
 * @LastEditTime: 2021-09-30 17:05:53
 * @Description: 文件实现描述
 */
#ifndef __CLIENT_APDU_H__
#define __CLIENT_APDU_H__

#include <unordered_map>
#include <stdint.h>
#include <iostream>
#include <memory>

#include "global_data_struct.h"
#include "CConfigManager.h"


typedef enum _CLIENT_APDU_TAG{
    CLIENT_CONNECT_REQUEST    = 2,   //建立应用连接请求 [2]
    CLIENT_RELEASE_REQUEST    = 3,   //断开应用连接请求 [3] 
    CLIENT_GET_REQUEST        = 5,   //读取请求 [5]
    CLIENT_SET_REQUEST        = 6,   //设置请求 [6]
    CLIENT_ACTION_REQUEST     = 7,   //操作请求 [7]
    CLIENT_REPORT_RESPONSE    = 8,   //上报应答 [8]
    CLIENT_PROXY_REQUEST      = 9,   //代理请求 [9]
    CLIENT_ERROR_RESPONSE     = 110  //异常响应 [110] 
}CLIENT_APDU_TAG;


class Client_APDU{
private:
    /*  */
    static Client_APDU c_client_apdu; 
public:
    Client_APDU();
    ~Client_APDU();

    static Client_APDU *getInstance();

    int get_request_assemble(std::shared_ptr<CConfigManager> cm, TASK_PARAMS *task_params, uint8_t *apdu, int len);
};










#endif /* __CLIENT_APDU_H__ */